Only include the necessary headers in GtkPlacesViewRow
authorEmmanuele Bassi <ebassi@gnome.org>
Tue, 10 Nov 2015 13:49:11 +0000 (13:49 +0000)
committerEmmanuele Bassi <ebassi@gnome.org>
Tue, 10 Nov 2015 13:49:11 +0000 (13:49 +0000)
When compiling inside GTK we also use the GTK_COMPILATION guard, as the
GtkPlacesView and GtkPlacesViewRow widgets are shared with Nautilus.

gtk/gtkplacesviewrow.c

index 3466053e4f20a56a0e5fd54298e57736f6d44b4b..e8ac7a8d6c29f66dde44c11e3a59155cf090c679 100644 (file)
 #include "config.h"
 
 #include <gio/gio.h>
-#include <gtk/gtk.h>
 
-#include "gtkintl.h"
 #include "gtkplacesviewrowprivate.h"
+
+/* As this widget is shared with Nautilus, we use this guard to
+ * ensure that internally we only include the files that we need
+ * instead of including gtk.h
+ */
+#ifdef GTK_COMPILATION
+#include "gtkbutton.h"
+#include "gtkeventbox.h"
+#include "gtkimage.h"
+#include "gtkintl.h"
+#include "gtklabel.h"
+#include "gtkspinner.h"
 #include "gtktypebuiltins.h"
+#else
+#include <gtk/gtk.h>
+#endif
 
 struct _GtkPlacesViewRow
 {